/**
 * jims
 */
package com.jims.master.modules.oper.service;

import com.jims.master.common.persistence.Page;
import com.jims.master.common.service.CrudService;
import com.jims.master.common.utils.ChineseCharToEnUtils;
import com.jims.master.modules.oper.dao.DiseaseManagementDao;
import com.jims.master.modules.oper.entity.DiseaseManagement;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Service
 * @author 系统管理员
 * @version 2017-06-13
 */
@Service
@Transactional(readOnly = true)
public class DiseaseManagementService extends CrudService<DiseaseManagementDao, DiseaseManagement> {

	public DiseaseManagement get(String id) {
		return super.get(id);
	}
	
	public List<DiseaseManagement> findList(DiseaseManagement diseaseManagement) {
		return super.findList(diseaseManagement);
	}
	
	public Page<DiseaseManagement> findPage(Page<DiseaseManagement> page, DiseaseManagement diseaseManagement) {
		return super.findPage(page, diseaseManagement);
	}
	
	@Transactional(readOnly = false)
	public int save(DiseaseManagement diseaseManagement) {
		diseaseManagement.setInputCode(ChineseCharToEnUtils.getAllFirstLetter(diseaseManagement.getBzmc()));
		return super.save(diseaseManagement);
	}
	
	@Transactional(readOnly = false)
	public int delete(DiseaseManagement diseaseManagement) {
		return super.delete(diseaseManagement);
	}

	public List<DiseaseManagement> findListDict(String[] ids,String q,String limit){
		List<DiseaseManagement> list = dao.findListDict(ids,q,limit);
		return list;
	}
	
}